import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/Login.vue'
import Monitor from '../views/Monitor.vue'
import Entity from '../views/Entity.vue'
import Fence from '../views/Fence.vue'
import Config from '../views/Config.vue'
import Help from '../views/Help.vue'


Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'monitor',
    redirect: '/monitor'
  },
  {
    path: '/login',
    name: 'login',
    meta: {
      index: 2
    },
    component: () => import(/* webpackChunkName: "login" */ '../views/Login.vue'),
  },
  {
    path: '/monitor',
    name: 'monitor',
    meta: {
      index: 1
    },
    component: () => import(/* webpackChunkName: "monitor" */ '../views/Monitor.vue'),
  },
  {
    path: '/entity',
    name: 'entity',
    meta: {
      index: 1
    },
    component: () => import(/* webpackChunkName: "entity" */ '../views/Entity.vue'),
  },
  {
    path: '/fence',
    name: 'fence',
    meta: {
      index: 1
    },
    component: () => import(/* webpackChunkName: "fence" */ '../views/Fence.vue'),
  },
  {
    path: '/config',
    name: 'config',
    meta: {
      index: 1
    },
    component: () => import(/* webpackChunkName: "config" */ '../views/Config.vue'),
  },
  {
    path: '/help',
    name: 'help',
    meta: {
      index: 1
    },
    component: () => import(/* webpackChunkName: "help" */ '../views/Help.vue'),
  },
  
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
